<extend name="public@base5" />
<block name="main">
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="nav-item">
                <a class="nav-link active" href="{:url('Promote/inviteUserDetail')}">邀请详情</a>
            </li>
        </ul>
        <form class="well form-inline margin-top-20 bg-white" method="get" action="{:url('Promote/inviteUserDetail')}">
            <input type="text" class="form-control form-check-inline" name="parent_id" style="width: 200px;"
                value="{$parent_id|default=''}" placeholder="请输入父用户ID">
            &nbsp;
            <input type="text" class="form-control form-check-inline" name="user_id" style="width: 200px;"
                value="{$user_id|default=''}" placeholder="请输入用户ID">
            &nbsp;
            <input type="text" class="form-control form-check-inline" name="mobile" style="width: 200px;"
                value="{$mobile|default=''}" placeholder="请输入手机号码"> &nbsp;
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Promote/inviteUserDetail')}">清空</a>
        </form>
        <table class="table table-hover table-bordered margin-top-20">
            <thead>
                <tr>
                    <th width="60">用户ID</th>
                    <th>昵称</th>
                    <th>头像</th>
                    <th>星链石</th>
                    <th>手机</th>
                    <th>直邀人数</th>
                    <th>间邀人数</th>
                    <th>邀请时间</th>
                    <th>奖励总数</th>
                    <th>父用户ID</th>
                    <th>父用户昵称</th>
                    <th>父用户手机</th>
                    <th width="120">{:lang('ACTIONS')}</th>
                </tr>
            </thead>
            <tbody>
                <foreach name="items" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.user_nickname}</td>
                        <td>
                            <img width="50" height="50" src="{:cmf_get_image_url($vo.avatar)}">
                        </td>
                        <td>{$vo.score}</td>
                        <td>{$vo.mobile}</td>
                        <td>{$vo.directPromoteCount}</td>
                        <td>{$vo.indirectPromoteCount}</td>
                        <td>{:date('Y-m-d H:i:s',$vo['update_time'])}</td>
                        <td>{$vo.rewardCount}</td>
                        <td>{$vo.parent_id}</td>
                        <td>{$vo.parent_nickname}</td>
                        <td>{$vo.parent_mobile}</td>
                        <td>
                            <a class="btn btn-xs btn-primary" href="{:url('Promote/inviteUserDetail',['parent_id'=>$vo.id])}">下级用户</a>
                            <a class="btn btn-xs btn-success" href="{:url('Promote/rewardDetail',['user_id'=>$vo.id])}">收入详情</a>
                        </td>
                    </tr>
                </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </div>
</block>